perm filename MANUAL.TEX[TEX,DEK]1 blob sn#362425 filedate 1978-06-22 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00005 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	\input manhdr % This is the TEX user manual source text
C00003 00003	\titlepage
C00010 00004	\chapterbegin 1. {The name of the game}
C00013 00005	\chapterbegin 2. {Why book printing is different from ordinary typing}
C00022 ENDMK
C⊗;
\input manhdr % This is the TEX user manual source text
% BEWARE BUGS, IT'S ONLY THE ZEROTH DRAFT
\titlepage
\tenpoint
\vfill
\ctrline{\:<TAU EPSILON CHI, a system for technical text}
\ctrline{$\copyright$ 1978 by D. E. Knuth}
\ctrline{\:f(first draft--do not read)}
\vfill
\gdef\chead{Preface}
\manmark{\chead}{\chead}
\setcpage 0
\eject
\titlepage
\vskip 2in plus 1in
\ctrline{\:;TAU EPSILON CHI}
\vskip 13pt
\ctrline{\:q A SYSTEM FOR TECHNICAL TEXT}
\vskip .5in plus .5in
\tenpoint
\noindent\hangindent 25pt for 2
{\:c ENTLE} R{\:c EADER}: This is a handbook about
\TEX, a computerized typesetting system intended for the creation
of beautiful books---and especially for books that contain a lot of
mathematics. By preparing a manuscript in \TEX\ format, you will be
telling a computer exactly how the manuscript is to be transformed into
pages whose typographic quality is comparable to that of the world's
finest printers; yet you won't need to do much more work than would be
involved if you were simply typing the manuscript on an ordinary
typewriter. In fact, your total work will probably be significantly less,
if you consider the time it ordinarily takes to revise a typewritten manuscript,
since computer text files are so easy to change and to reprocess.
(If all this sounds too good to be true, just remember that it was
written by \TEX's designer, on a day when \TEX\ happened to
be working, so the statements may be biased.)

This manual is intended for people who have never used \TEX\ before, as
well as for experienced \TEX\ hackers. In other words, it's the only
manual there is. Everything you need to know about \TEX\ is explained
here somewhere, and so are a lot of things that most users don't need to
know. If you are preparing a simple manuscript, it is very simple to do
this without knowing much about \TEX\ at all; on the other hand, some
things that go into the printing of technical books are inherently
more difficult, and if you wish to achieve more complex effects you
will want to penetrate into some of \TEX's darker corners. In order
to make it possible for many types of users to read this manual
effectively, a special symbol is used to designate material that is
for wizards only: When the symbol
$$\vcenter{\hjust{\:@\char'177}}$$
appears at the beginning of a paragraph, it warns of a ``dangerous bend''
in the train of thought; don't read the paragraph unless you need to.
Brave and experienced drivers at the controls of \TEX\ will gradually enter
more and more of these hazardous areas, but for most applications the
complicated details won't matter.

All that you really need to know before reading on is how to get a
file of text into your computer using a standard editing program; this
manual explains what that file ought to look like so that \TEX\ will
understand it, but basic computer usage is not explained here.
Some previous experience with technical typing will be quite helpful
if you plan to do heavily mathematical work with \TEX, although it
is not absolutely necessary; \TEX\ will do most of the necessary
formatting of equations automatically, but users with more experience
will be able to obtain better results since there are so many ways
to deal with formulas.

Computer system manuals usually make dull reading, but take heart:
This one contains {\:m JOKES} every once in awhile, so you might actually
enjoy reading it. (However, most of the jokes can only be appreciated
properly if you understand a technical point that is being made---so
read {\sl carefully}.)

Another somewhat unique characteristic of this manual is that it doesn't
always tell the truth. When informally introducing certain \TEX\
concepts, general rules will be stated, but later you will find that they
aren't strictly true. The author feels that this technique of deliberate
lying will actually make it easier for you to learn the concepts; once
you learn a simple but false rule, it will not be hard to supplement that
rule with its exceptions.

In order to help you internalize what you're reading, occasional
{\:m EXERCISES} are sprinkled through this manual. It is generally intended
that every reader should try every exercise, except those exercises which appear
in the ``dangerous bend'' areas. If you can't solve the problem, you
can always look at the answers that appear at the end of the manual;
but please, try first to solve it by yourself, then you'll learn more
and you'll learn faster. Furthermore, if you think you do know the answer to
an exercise, you should turn to the answer pages and check it out.
\chapterbegin 1. {The name of the game}
English words like ``technology'' stem from a Greek root beginning with
the letters $\tau\epsilon\chi\ldotsm$; and this same Greek word means {\sl art}
as well as technology. Hence the name \TEX, which is an upper-case form of
$\tau\epsilon\chi$.

Insiders pronounce the $\chi$ of \TEX\ as a Greek chi, not as an ``x'', so that
\TEX\ rhymes with the word blecchhh. It's the ``ch'' sound in Scottish words
like {\sl loch} or German words like {\sl ich}; it's a Spanish ``j'' and a
Russian ``kh''. When you say it properly to your computer, the terminal
may become slightly moist.

The purpose of this pronunciation exercise is to remind you that \TEX\ is
primarily concerned with high-quality technical manuscripts: Its emphasis is
on art and technology, as in the corresponding Greek word. If you merely want
to produce passably good quality---something acceptable and basically
readable but not really beautiful---you can use a simpler system. With \TEX\
the goal is to produce the {\sl finest} quality; this requires more attention
to detail, but fortunately it is not that much harder to go this extra
distance, and you can take special pride in the finished product.

On the other hand you might find it more comfortable to pronounce \TEX\ as
a Texan would, and to shrug off all this high-falutin' nonsense about beauty
and quality.  Go ahead and do what you want, the computer won't mind.
\chapterbegin 2. {Why book printing is different from ordinary typing}
When you first started using a computer terminal, you probably had to adjust
to the difference between the digit ``1'' and the lower-case letter ``l''.
When you take the next step to the level of typography that is common in
book publishing, a few more adjustments of the same kind need to be made.

In the first place, there are two kinds of quotation marks in books, but only
one kind on the typewriter. Even on your computer terminal,
which has more characters
than an ordinary typewriter, you probably have only a non-oriented double-quote
mark (\raise2pt\hjust{\tt "}),
because the standard ``ascii'' code for computers was not
invented with book publishing in mind. However, your terminal probably does have
two flavors of single quote marks, namely ` and ', the second of
which is useful also as an apostrophe. 

To produce double quote marks with \TEX, you simply type two single quote marks
of the appropriate kind. For example, to produce an output like
$$\hjust{``I understand.''}$$
(including the quotation marks) you would type
$$\hjust{\tt ``I understand.''}$$
on your terminal.

A typewriter-like style of type will be used throughout this manual to indicate
examples of \TEX\ format that you might type on your terminal, so that the
symbols you enter are readily distinguishable from the output \TEX\ would
produce and from the comments in the manual itself. Here are the symbols to be
used in the examples:
$$\save1\hjust{\≡0123456789"#$%&@⊗*+-=,.:;?!≡\}
\save2\hjust{\≡()<>[]{}`'←→↑↓\/≡\}
\eqalign{⊗\hjust{\tt ABCDEFGHIJKLMNOPQRSTUVWXYZ}\cr
⊗\hjust{\tt abcdefghijklmnopqrstuvwxyz}\cr
⊗\box1\cr
⊗\box2\cr}$$
If these are not all on your computer terminal, do not despair; \TEX can make
do with the ones you have. One additional symbol
$$\space$$
is also used to stand for a {\sl blank space}, in case it is important to
emphasize that a blank space is typed; without such a symbol you would have
difficulty seeing the invisible parts of certain examples.

Another important distinction between book printing and ordinary typing is
the use of dashes, hyphens, and minus signs. In good math books, these
symbols are all different, in fact there are usually at least four different
symbols in use:
$$\vjust{\halign{#\hfill\cr
a hyphen (-);\cr
an en-dash (--);\cr
an em-dash (---);\cr
a minus sign ($-$).\cr}}$$
Hyphens are used for compound words like ``nitty-gritty'' and ``Fawcett-Majors.''
En-dashes are used for number ranges like ``pages 13--34'' and also in
contexts like ``exercise 1.2.6--52''. Em-dashes are used for punctuation in
sentences---they are what we often call simply dashes. And minus signs are
used in formulas. A conscientious user of \TEX\ will be careful to make a
distinction between these four usages, and here is how to do it:
$$\vjust{\halign{#\hfill\cr
for a hyphen, type a hyphen ({\tt -});\cr
for an en-dash, type two hyphens ({\tt --});\cr
for an em-dash, type three hyphens ({\tt ---});\cr
for a minus sign, type a hyphen in mathematics mode ({\tt $-$}).\cr}}$$
(Mathematics mode occurs between dollar signs; it is discussed later, so you
shouldn't worry about it now.)

If you look closely at most well-printed books, you will find that certain
combinations of letters are treated as a unit. For example, this is true of the
``f'' and and ``i'' of ``find''. Such combinations are called {\sl ligatures},
and professional typesetters have traditionally been trained to watch for letter 
pairs such as {\tt ff}, {\tt fi}, {\tt fl}, {\tt ffi}, and {\tt ffl}. (It's
somewhat surprising how often these ligatures appear.) Fortunately you do
{\sl not} have to concern yourself with ligatures, since \TEX\ is perfectly
capable of handling such things by itself. In fact, \TEX\ will also look
for combinations of adjacent letters (like ``{\tt A}'' next to ``{\tt V}'')
that ought to be moved closer together for better appearance; this is
called {\sl kerning}.

To summarize this section: When using \TEX\ for straight copy, it's essentially
like ordinary typing, except that you need to be careful about quotation
marks, the number 1, and various kinds of hyphens/dashes. \TEX\ will take
care of other niceties like ligatures and kerning by itself.

\danger If you need to type quotes within quotes, for example a single quote
followed by a double quote, you can't simply type {\tt '''} because \TEX\
will interpret this as ''' (namely, double-quote followed by single-quote);
furthermore there should be a little more space between the '' and the ' here,
even if you wanted the double-quote first. You wouldn't want to type
{\tt '$\space$''} either, because this space would be too large---just as
large as the space between words---and \TEX\ might even start a new line at
such a space when it makes up a paragraph! The solution to this problem is
sort of hokey, and it uses features defined later in this manual, but here it
is anyway: First solution, use the idea of ``thin space'' in math formulas,
and type {\tt '$\,$''}. The result is '$\,$''. Second solution, include
$$\hjust{\≡\def\2{\hjust to 2pt{}}≡\}$$ as a definition in the format of your
manuscript, then type {\≡'\2''≡\} for single-quote followed by double-quote,
etc. This definition puts 2 points of blank space between the quotes, so the
result is '\hjust to 2pt{}''; you could, of course, vary the amount of space,
or define another control sequence besides {\≡\2≡\} for this purpose.